<hr>
<h1>添加分类</h1>

<form action="/category/add" method="post">
	<input name="title" />
	<input name="sort" value="0" />
	<input type="submit" value="add"/>
</form>


<hr/>
<h1>分类列表</h1>
<table>
<tr>
	<td>id</td>
	<td>title</td>
	<td>sort</td>
	<td>create</td>
	<td>update</td>
	<td>operate</td>
</tr>
	<%@categories.each do |item| %>
<tr>
	<td><%=item['id']%></td>
	<td><%=item['title']%></td>
	<td><%=item['sort']%></td>
	<td><%=item['created_at']%></td>
	<td><%=item['updated_at']%></td>
	<td>
		<a href="/category/posts/<%=item['id']%>">posts</a>&nbsp;
	<td>
		<a href="/category/edit/<%=item['id']%>">edit</a>&nbsp;
		<a href="/category/del/<%=item['id']%>">del</a>
	</td>
</tr>
	<%end%>
</table>



<hr/>
<a href="/build/index">生成index</a>
<a href="/posts/new">new post</a>
